import 'package:flutter/material.dart';
import '../services/ScreenAdatper.dart';
class JdText extends StatelessWidget {
  final String text;
  final bool password;
  final Object onChanged;
  JdText({Key key,this.text = '输入内容',this.password = false,this.onChanged = null}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      child: TextField( 
        obscureText: this.password,
        decoration: InputDecoration(
          hintText: this.text, 
          border: OutlineInputBorder(
            borderSide: BorderSide.none,
            borderRadius: BorderRadius.circular(30)
          )
        ),
        onChanged:this.onChanged,
      ),
      height: ScreenAdatper.height(68),
      decoration: BoxDecoration( 
        border: Border(
          bottom: BorderSide(
            width: 1,
            color: Colors.black12
          )
        )
      ),
    );
  }
}